package com.zlm.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Author: Harbour
 * Date: 2021-05-16 20:53
 * Desc:
 */
public class MyPropertiesUtils {

    private static Properties prop;

    static {
        InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("application.properties");
        try {
            prop = new Properties();
            prop.load(is);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getProperty(String key) {
        return prop.getProperty(key);
    }

}
